<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: bobo
  Date: 16-11-3
  Time: 下午7:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <jsp:include page="../layout/head.jsp" >
        <jsp:param name="title" value="" />
    </jsp:include>
</head>
<body>
<div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 举报信息</strong></div>
    <table class="table table-hover text-center">
        <tr>
            <th>评论</th>
            <th>文章</th>
            <th width="25%">举报次数</th>
        </tr>
        <c:forEach items="${page.list}" var="reportDto" varStatus="abc">
            <c:if test="${reportDto.reports!=0}">
                <tr>
                    <td>
                        <a href="${pageContext.request.contextPath}/admin/report/getReport?messageId=${reportDto.messageId}">
                                ${reportDto.content}</a>
                    </td>
                    <td> ${reportDto.topic.title}</td>
                    <td>${reportDto.reports}</td>
                </tr>
            </c:if>
        </c:forEach>

        <%--<tr>--%>
            <%--<td colspan="5">--%>
                <%--<jsp:include page="../layout/pager.jsp">--%>
                    <%--<jsp:param name="pageNum" value="${page.pageNum}"/>--%>
                    <%--<jsp:param name="current" value="${page.current}"/>--%>
                    <%--<jsp:param name="pageSize" value="${page.pageSize}"/>--%>
                    <%--<jsp:param name="url" value="${pageContext.request.contextPath}/admin/report/getReports"/>--%>
                <%--</jsp:include>--%>
            <%--</td>--%>
        <%--</tr>--%>
    </table>
</div>
<script>
    <%--function del(id) {--%>
        <%--var id=id;--%>
        <%--if(confirm('删除后不可恢复')){--%>
            <%--$.ajax({--%>
                <%--url:"${pageContext.request.contextPath}/admin/report/del",--%>
                <%--type:"get",--%>
                <%--data:{"id":id},--%>
                <%--success:function (data) {--%>
                    <%--if(data == "true"){--%>
                        <%--alert("删除成功");--%>
                        <%--window.location.reload();--%>
                    <%--}else--%>
                    <%--if(data == "false"){--%>
                        <%--alert("删除失败");--%>
                    <%--}--%>
                <%--},--%>
                <%--error: function () {--%>
                    <%--alert("删除失败");--%>
                <%--}--%>
            <%--})--%>
        <%--}else {--%>
            <%--return false;--%>
        <%--}--%>
    <%--}--%>
</script>
</body>
</html>
